import com.itheima.domian.Account;
import com.itheima.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Test {
    public static void main(String[] args) {
        ApplicationContext ctx= new ClassPathXmlApplicationContext("applicationContext.xml");
        AccountService accountService = (AccountService)ctx.getBean("accountService");
        List<Account> all = accountService.findAll();

        for (Account account : all) {
            System.out.println(account);
        }
    }
}
